<?php

namespace App\Http\Controllers;

use App\Events\SetTicket;
use App\Jobs\SendMessage;
use Illuminate\Support\Facades\Redis;

class HomeController extends Controller
{
   /**
    * Create a new controller instance.
    *
    * @return void
    */
   public function __construct()
   {
//      $this->middleware('auth');
   }

   /**
    * Show the application dashboard.
    *
    * @return \Illuminate\Contracts\Support\Renderable
    */
   public function index()
   {
      $data = ['MIKE', 'LIKE', 'KIKE'];
//      Redis::setex('name', 60, json_encode($data));
//      $value = Redis::get('name');
//      if ($value) {
//         event(new SetTicket($data)); //分发事件
//      }
//      return $value;

      return view('home');
   }
}
